<div class="blade-content ng-scope" id="blade-content">
  <div class="blade-inner">
    <div class="inner-block">
      <form name="form" class="form" (submit)="onCreate()" [formGroup]="formGroup" novalidate>
        <div class="blade-static __bottom" *ngIf="currentBlade.isNew">
          <button class="btn" [disabled]="!formGroup.valid">创建</button>
        </div>
        <div class="column">
          <div class="form-group">
            <label class="form-label">名称</label>
            <div class="form-input">
              <input id="roleName" name="roleName" type="text" placeholder="输入名称" autocomplete="off" formControlName="roleName">
            </div>
            <div *ngIf="formErrors.roleName" class="form-error">
              {{ formErrors.roleName }}
            </div>
          </div>
          <div class="form-group">
            <label class="form-label">描述</label>
            <div class="form-input">
              <textarea cols="30" rows="5" id="roleDesc" name="expr" class="form-control" formControlName="roleDesc"></textarea>
            </div>
          </div>
          <div class="form-group" *ngIf="isNew">
            <label class="form-label">基础角色</label>
            <div class="form-control __checkbox">
              <label class="form-label" *ngFor="let item of roles;">
                    <input  name="config" (click)="onRoleIsChecked($event.target.checked,item)" [value]="item.roleId" type="radio">
                      <!-- <input type="checkbox" [checked]="item?.isChecked" [value]="item.roleId" (click)="onRoleIsChecked($event.target.checked,item)"> -->
                      <span class="check"></span>
                      <span class="name">{{item.roleName}}</span>
                  </label>
            </div>
          </div>
        </div>
      </form>
    </div>
  </div>
</div>
